package com.xdcplus.web.mapper.bd;

import com.xdcplus.mp.mapper.IBaseMapper;
import com.xdcplus.web.common.pojo.entity.bd.BdPath;
import com.xdcplus.web.common.pojo.query.bd.BdPathQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 工艺路线详细表(BdPath)表数据库访问层
 *
 * @author Fish.Fei
 * @since 2023-02-07 14:17:23
 */
public interface BdPathMapper extends IBaseMapper<BdPath> {

    /**
     * 查询工艺路线详细表(BdPath)
     *
     * @param bdPathQuery 工艺路线详细表(BdPath)查询
     * @return {@link List<BdPath>}
     */
    List<BdPath> queryBdPath(BdPathQuery bdPathQuery);

    List<BdPath> findBdPathByIdPathIdFk(Long pathIdFk);

    /**
     * 因调整工艺，更新工艺线序列
     * @param bdPath
     */
    void updateBdPathIncreSeqNo(BdPath bdPath);
    /**
     * 因删除/调整工艺，更新工艺线序列
     * @param bdPath
     */
    void updateBdPathReduceSeqNo(BdPath bdPath);


    /**
     * 根据工艺路线Code及当前工序,查询下个工序
     * @param pathCode 工艺路线Code
     * @param crOpeCode 当前工序Code
     * @return
     */
    BdPath getBdPathByPathCodeAndCrOpeCode(@Param("pathCode") String pathCode, @Param("crOpeCode") String crOpeCode);

}
